package com.study.it.service;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.study.it.entity.PageInfo;

public interface BaseService<T> {
	  public void refresh(T o);
	
	   public void add(T o);
	   public void edit(T o);
	   public void remove(Serializable id);
	   public void remove(T o);
	   
	   public T loadOne(Serializable id) ;
	   public T findOne(Serializable id) ;
	   public T findOne(DetachedCriteria dc);
	   public Object findSingle(DetachedCriteria dc);
	   
	   public List<T> findList();
	   public List<T> findList(DetachedCriteria dc);
	   public List<T> findList(DetachedCriteria dc, boolean iscache);
	   public List<T> findList(DetachedCriteria dc, int pageIndex, int row);
	   public List<T> findList(DetachedCriteria dc, int pageIndex, int row, boolean isCache);
	   public int findDataCount(DetachedCriteria dc);
	   
	   public PageInfo<T> findPage(DetachedCriteria dc, int pageIndex, int row);
	   public PageInfo<T> findPage(DetachedCriteria dc, int pageIndex, int row, boolean isCache);
	   
	   
	   
	   
	   
	   
}
